<script setup lang="ts">
import { getListByCondition, urls } from '@/index';
import type { DialogModel, NdeReportProcessFlow } from '@/index.d';
import { useRequest } from 'vue-request';

const processFlowDrawModel = defineModel<DialogModel<NdeReportProcessFlow>>({ required: true });
const activities = [
  {
    content: 'Event start',
    timestamp: '2018-04-15'
  },
  {
    content: 'Approved',
    timestamp: '2018-04-13'
  },
  {
    content: 'Success',
    timestamp: '2018-04-11'
  }
];

const { data } = useRequest(() =>
  getListByCondition<NdeReportProcessFlow>(
    urls.ndeReportProcessFlow,
    'ndeCommissionId',
    processFlowDrawModel.value.id
  )
);
</script>
<template>
  <el-drawer v-model="processFlowDrawModel.visible" size="20%">
    <template #default>
      <el-scrollbar>
        <el-timeline>
          <el-timeline-item v-for="(item, index) in data" :key="index" :timestamp="item.createTime">
            {{ item.processName }}---{{ item.creator?.name }}
          </el-timeline-item>
        </el-timeline>
      </el-scrollbar>
    </template>
  </el-drawer>
</template>
<style lang="scss" scoped></style>
